const http = uni.$u.http
import { baseUrl } from "../common/http.interceptor";

export default {
    /**
     * 文件上传
     */
    uploadImage: baseUrl + '/upload/file',
    // 增删改查
    qualityInspection: {
        page:(params) => http.get('/quality-inspection', params),
        create:(data) => http.post('/quality-inspection', data),
        update:(id, data) => http.put('/quality-inspection/' + id, data),
        delete:(id) => http.delete('/quality-inspection/' + id),
        read:(id) => http.get('/quality-inspection/' + id),
        getQrcode:(id) => http.get('/quality-inspection/getQrcode', { id }),
    },
    car: {
        page:(params) => http.get('/car', params),
        create:(data) => http.post('/car', data),
        update:(id, data) => http.put('/car/' + id, data),
        delete:(id) => http.delete('/car/' + id),
        read:(id) => http.get('/car/' + id),
    },
    login: (data) => http.post('/user/login', data),
    getUserInfo: (id) => http.get('/user/' + id),
}
